//
//  SettingGroupModel.h
//  AutoMate
//
//  Created by hao on 2018/3/1.
//  Copyright © 2018年 songlei. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SettingItemModel.h"

@interface SettingGroupModel : NSObject

+ (instancetype)settingGroupModelWithItems:(NSArray<SettingItemModel *> *)items;
- (instancetype)initWithSettingItems:(NSArray<SettingItemModel *> *)items;

+ (instancetype)settingGroupModelWithItems:(NSArray<SettingItemModel *> *)items
                                 headTitle:(NSString *)headTitle
                                headHeight:(CGFloat)headHeight
                                 footTitle:(NSString *)footTitle
                                footHeight:(CGFloat)footHeight;

+ (instancetype)settingGroupModelWithItems:(NSArray<SettingItemModel *> *)items
                                  headView:(UIView *)headView
                                headHeight:(CGFloat)headHeight
                                  footView:(UIView *)footView
                                footHeight:(CGFloat)footHeight;

/** 一个cell组 */
@property (nonatomic, strong) NSArray<SettingItemModel *> *itemsArr;

/** cell组的组头标题, 默认nil */
@property (nonatomic, copy) NSString  *groupHeadTitle;
/** cell组的组尾标题, 默认nil */
@property (nonatomic, copy) NSString  *groupFootTitle;

/** cell组的组头View, 默认nil */
@property (nonatomic, strong) UIView  *groupHeadView;
/** cell组的组尾的View, 默认nil */
@property (nonatomic, strong) UIView  *groupFootView;

/** 该组的组头高度, 默认0.000001(使用便利初始化方法才会这样赋值), 等于0系统会给默认值 */
@property (nonatomic, assign) CGFloat  groupHeadHeight;
/** 该组的组尾高度, 默认0.000001(使用便利初始化方法才会这样赋值), 等于0系统会给默认值 */
@property (nonatomic, assign) CGFloat  groupFootHeight;

/** 记录当前组是否需要打开(二级列表所需的属性),默认为NO */
@property (nonatomic, assign, getter=isOpen) BOOL open;

@end
